<div class="info">
  <%= user_name_tag(activity.actor) %>
  <%= t("activities.has added") %>
  <%= user_name_tag(activity.target&.user) %>
  <%= t("activities.to") %>
  <% if activity.target&.subject_type == "User" %>
    <%= user_name_tag(activity.target&.subject) %>
  <% else %>
    <%= repository_name_tag(activity.target&.subject) %>
  <% end%>
  <%= t("activities.as") %> <%= activity.target&.role %>
</div>
<span class="time"><%= timeago activity.created_at %></span>
